<style>
	#butt a{
		color:#000000;
		text-decoration:none;
	}
	#butt{
		line-height:24px;
		display:inline-block;
		border-radius:4px;
		cursor:pointer;
		width:80px;
		height:24px;
		background-color:#99eeff;
	}
	table{
		font-size:12px;
		width:1160px;
		text-align:center;
		border-collapse:collapse;
	}
	table tr td{
		border:1px solid #999;
		height:30px;
	}
	.tr_b td{
		font-weight:bold;
	}
</style>
<script>
	function del(){
			return confirm('确定要删除？');
	}

</script>
	<table>
		<tr >
			<td colspan="7"><div id="butt"><a href="/index.php/Admin/Article/add">添加新文章</a><div></td>
		</tr>
		<tr class='tr_b'>
			<td>#编号</td>
			<td>文章标题</td>
			<td>id</td>
			<td>文章分类</td>
			<td>重要性</td>
			<td>状态</td>
			<td>添加日期</td>
			<td>操作</td>
		</tr>
<?php
	$i=0;
	foreach ($artData as $val):
?>
		<tr class='tr_n'>
			<td><?php echo ++$i; ?></td>
			<td><?php echo $val['title'] ?></td>
			<td><?php echo $val['id']; ?></td>
			<td><?php echo $val['cateName'] ?></td>
			<td>
<?php 
	if ($val['importance']==0) {
		echo '普通';
	}else{
		echo '置顶';
	}
?>
			</td>
			<td>
<?php 
	if($val['status']==1)
		echo '<font color="green">开启</font>';
	else
		echo '<font color="red">关闭</font>';
?>
			</td>
			<td><?php echo date('Y-m-d H 时',$val['atime']) ?></td>
			<td>
				<a href='/index.php/Admin/Article/update/id/<?php echo $val['id']?>'>修改</a>
				
				<a href='/index.php/Admin/Article/delete/id/<?php echo $val['id']?>'>删除</a>
			</td>
		</tr>
<?php
	endforeach;
?>

	</table>